Skip to content

Support diffing bytecode versions for classes#473

Merged
JakeWharton merged 1 commit intoJakeWharton:trunkfrom
Goooler:diff-byte-code-version
Mar 19, 2026
Merged

Support diffing bytecode versions for classes#473
JakeWharton merged 1 commit intoJakeWharton:trunkfrom
Goooler:diff-byte-code-version

Conversation

@Goooler
Copy link
Copy Markdown
Contributor

@Goooler Goooler commented Mar 8, 2026

OLD: old.jar
NEW: new.jar

 JAR   │ old     │ new     │ diff
───────┼─────────┼─────────┼────────
 class │ 1.2 KiB │ 1.4 KiB │ +201 B
 other │    72 B │    72 B │    0 B
───────┼─────────┼─────────┼────────
 total │ 1.3 KiB │ 1.5 KiB │ +201 B

 CLASSES │ old │ new │ diff
─────────┼─────┼─────┼───────────
 classes │   1 │   1 │ 0 (+0 -0)
 methods │   4 │   4 │ 0 (+1 -1)
  fields │   1 │   1 │ 0 (+0 -0)

=================
====   JAR   ====
=================

 size    │ diff   │ path
─────────┼────────┼────────────────────────────
 1.4 KiB │ +201 B │ ∆ org/example/MainKt.class
─────────┼────────┼────────────────────────────
 1.4 KiB │ +201 B │ (total)

=====================
====   CLASSES   ====
=====================

BYTECODE VERSIONS:

   old │ new │ diff
  ─────┼─────┼───────────
   1   │ 1   │ 0 (+1 -1)

  + org.example.MainKt: 65

  - org.example.MainKt: 69

METHODS:

   old │ new │ diff
  ─────┼─────┼───────────
   4   │ 4   │ 0 (+1 -1)

  + kotlin.jvm.internal.Intrinsics checkNotNullParameter(Object, String)

  - org.example.MainKt main()

```
OLD: old.jar
NEW: new.jar

 JAR   │ old     │ new     │ diff
───────┼─────────┼─────────┼────────
 class │ 1.2 KiB │ 1.4 KiB │ +201 B
 other │    72 B │    72 B │    0 B
───────┼─────────┼─────────┼────────
 total │ 1.3 KiB │ 1.5 KiB │ +201 B

 CLASSES │ old │ new │ diff
─────────┼─────┼─────┼───────────
 classes │   1 │   1 │ 0 (+0 -0)
 methods │   4 │   4 │ 0 (+1 -1)
  fields │   1 │   1 │ 0 (+0 -0)

=================
====   JAR   ====
=================

 size    │ diff   │ path
─────────┼────────┼────────────────────────────
 1.4 KiB │ +201 B │ ∆ org/example/MainKt.class
─────────┼────────┼────────────────────────────
 1.4 KiB │ +201 B │ (total)

=====================
====   CLASSES   ====
=====================

BYTECODE VERSIONS:

   old │ new │ diff
  ─────┼─────┼───────────
   1   │ 1   │ 0 (+1 -1)

  + org.example.MainKt: 65

  - org.example.MainKt: 69

METHODS:

   old │ new │ diff
  ─────┼─────┼───────────
   4   │ 4   │ 0 (+1 -1)

  + kotlin.jvm.internal.Intrinsics checkNotNullParameter(Object, String)

  - org.example.MainKt main()
```
@JakeWharton
Copy link
Copy Markdown
Owner

I think this presentation is suboptimal, but it's good enough for a start.

Filed #490 for potential improvements.

@JakeWharton JakeWharton merged commit 198103e into JakeWharton:trunk Mar 19, 2026
1 check passed
@Goooler Goooler deleted the diff-byte-code-version branch March 19, 2026 14:58
@Goooler Goooler mentioned this pull request Mar 20, 2026
@Goooler Goooler linked an issue Mar 26, 2026 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support diffing Bytecode versions

2 participants